<?php
// uncomment the following to define a path alias
// Yii::setPathOfAlias('nghiaext','system//to/local-folder');

return array(
	'basePath'=>dirname(__FILE__).DIRECTORY_SEPARATOR.'..',
	'name'=>'Công ty An Thịnh Phát',
	'sourceLanguage'=>'vi',
	// 'language'=>'en',
	'timeZone'=>'Asia/Bangkok',
	
	// preloading 'log' component
	'preload'=>array('log'),

	// autoloading model and component classes
	'import'=>array(
		'application.models.*',
		'application.components.*',
		'application.helpers.*',
		
		'application.modules.webSetting.models.*',
		'application.modules.user.models.*',
		'application.modules.rights.*',
		'application.modules.rights.components.*',
		'application.modules.partner.models.*',
		'application.modules.product.models.*',
	),

	'modules'=>array(
		'backend'		=> array(),
		'product'		=> array(),
		'banner',
		'partner',
		'rights'		=> array(
			'install' => false,
			'userNameColumn'=>'email',
		),
		'user'			=> array('install'=>false),
		'webSetting'	=> array('install'=>false),
	),

	// application components
	'components'=>array(
		
		'db'=>array(
			'connectionString' => 'mysql:host=112.78.2.20;dbname=dientudo_anthinhphat',
			'emulatePrepare' => true,
			'username' => 'dientudo',
			'password' => 'T9QpagxW',
			'tablePrefix'=>'yii_',
			'charset' => 'utf8',
		),
		
		'format'=>array(
			'dateFormat'=>'d-m-Y',
			'datetimeFormat'=>'d-m-Y - H:i:s',
		),
		'widgetFactory'=>array(
			'class'=>'CWidgetFactory',
			'enableSkin'=>true,            
			'widgets'=>array(
				'CJuiDatePicker'=>array(
					'language'=>'vi',
				),
			),
		),		
		'user'=>array(
			'allowAutoLogin'=>true, // enable cookie-based authentication
			'loginUrl'=>array('/user/login'),
			'class'=>'RWebUser',
		),
		'authManager'=>array(
			'class'=>'RDbAuthManager',
			'assignmentTable' => 'yii_r_AuthAssignment',
			'itemTable'		  => 'yii_r_AuthItem',
			'rightsTable'	  => 'yii_r_Rights',
			'itemChildTable'  => 'yii_r_AuthItemChild',
		),
		'urlManager'=>array(
			'urlFormat'=>'path',
			// 'urlSuffix'=>'.html',
			'showScriptName'=>false,
		),
		'errorHandler'=>array(
            'errorAction'=>'site/error',
        ),
		'log'=>array(
			'class'=>'CLogRouter',
			'routes'=>array(
				array(
					'class'=>'CFileLogRoute',
					'levels'=>'error, warning',
				),
			),
		),
	),
	// application-level parameters that can be accessed
	// using Yii::app()->params['paramName']
	'params'=>array(
		// this is used in contact page
		'customerEmail'	=> 'maria.xuan.2910@gmail.com',
		'techEmail'		=> 'maria.xuan.2910@gmail.com',
		'author'		=> 'Công ty An Thịnh Phát',
		'copyright'		=> Yii::t('common','Xây dựng và phát triển bởi Công ty An Thịnh Phát'),
		'backendPageSizeOptions'=>array(25=>25,50=>50,100=>100,200=>200),
	),
);